package com.atguigu.gulimail.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Guo 2022/9/14 21:41:03
 */
@FeignClient("gulimail-gateway-guoguo")
public interface ProductFeignService {

    /**
     * /product/skuinfo/info/{skuId}
     * /api/product/skuinfo/info/{skuId}
     * feign两种写法：
     * 1.让所有请求过网关：@FeignClient("gulimail-gateway-guoguo")给网关机器发请求
     * 2.直接向后台服务发请求,指定服务处理@FeignClient("gulimail-product-guoguo")
     * @param skuId
     * @return
     */
    @GetMapping("/api/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);
}
